

#import "UIView+Ran.h"

@implementation UIView (Ran)

- (void)setRanX:(CGFloat)x
{
    CGRect tempFrame = self.frame;
    tempFrame.origin.x = x;
    self.frame = tempFrame;
}

- (CGFloat)ranX
{
    return self.frame.origin.x;
}

- (void)setRanY:(CGFloat)y
{
    CGRect tempFrame = self.frame;
    tempFrame.origin.y = y;
    self.frame = tempFrame;
}

- (CGFloat)ranY
{
    return self.frame.origin.y;
}

- (void)setRanWidth:(CGFloat)width
{
    CGRect tempFrame = self.frame;
    tempFrame.size.width = width;
    self.frame = tempFrame;
}

- (CGFloat)ranWidth
{
    return self.frame.size.width;
}

- (void)setRanHeight:(CGFloat)height
{
    CGRect tempFrame = self.frame;
    tempFrame.size.height = height;
    self.frame = tempFrame;
}

- (CGFloat)ranHeight
{
    return self.frame.size.height;
}

- (void)setRanCenterX:(CGFloat)centerX
{
    CGPoint center = self.center;
    center.x = centerX;
    self.center = center;
}

- (CGFloat)ranCenterX
{
    return self.center.x;
}

- (void)setRanCenterY:(CGFloat)centerY
{
    CGPoint center = self.center;
    center.y = centerY;
    self.center = center;
}

- (CGFloat)ranCenterY
{
    return self.center.y;
}

- (void)setRanSize:(CGSize)size
{
    CGRect tempFrame = self.frame;
    tempFrame.size.height = size.height;
    tempFrame.size.width = size.width;
    self.frame = tempFrame;
    
}

- (CGSize)ranSize
{
    return self.frame.size;
}


@end
